﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CFM.Common
{
    public static class PathHelper
    {
        public static string AssemblyFolder
        {
            get
            {
                return GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
            }
        }

        public static string ApplicationFolder
        {
            get
            {
                return GetDirectoryName(GetDirectoryName(GetDirectoryName(AssemblyFolder)))+"\\CFM";
            }
        }

        public static string ConfigFolder
        {
            get
            {
                return System.IO.Path.Combine(ApplicationFolder, "Config");
            }
        }

        public static string GetDirectoryName(string path)
        {
            return System.IO.Path.GetDirectoryName(path);
        }
    }
}
